package com.xingmang.common.constant;

import com.xingmang.common.enums.ResultCode;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @auther: hansom
 * @Version: 1.0
 * @create 2023/4/21 10:34
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResultBean<T> implements Serializable {
    private static final long serialVersionUID = 1L;
    private Integer status;
    private String message;
    private T data;
    public ResultBean(ResultCode resultCode,T data){
        this.status = resultCode.getCode();
        this.message = resultCode.getMsg();
        this.data = data;
    }
}
